<template>
  <div id="menu">
    <el-menu
      default-active="0"
      background-color="#0c2135"
      class="el-menu-vertical-demo"
      text-color="#b7bdc3"
      active-text-color="#0a60bd"
      unique-opened
      @select="handleSelect"
    >
      <el-menu-item index="/face">
        <i class="el-icon-user-solid"></i>
        <template #title>人脸库</template>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  methods: {
    handleSelect(path, pathlist) {
      this.$router.push(pathlist[0])
    },
  },
}
</script>

<style scoped lang="scss">
#menu {
  height: 100%;
  background-color: #001529;

  .logo {
    display: flex;
    height: 28px;
    padding: 12px 10px 8px 10px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;

    .img {
      height: 100%;
      margin: 0 10px;
    }

    .title {
      font-size: 16px;
      font-weight: 700;
      color: white;
    }
  }
  .el-menu {
    border-right: none;
  }

  // // 目录
  .el-submenu {
    background-color: #001529 !important;
    // 二级菜单 ( 默认背景 )
    .el-menu-item {
      padding-left: 50px !important;
      background-color: #0c2135 !important;
    }
  }

  ::v-deep .el-submenu__title {
    background-color: #001529 !important;
  }

  // hover 高亮
  .el-menu-item:hover {
    color: #fff !important; // 菜单
  }

  .el-menu-item.is-active {
    color: #fff !important;
    background-color: #0a60bd !important;
  }
  // .el-menu-vertical:not(.el-menu--collapse) {
  //   width: 100%;
  //   height: calc(100% - 48px);
  // }
}
</style>
